<?php
namespace Admin\Controller;
use Think\Controller;
class LoginController extends Controller { 
    public function index(){
		if(!IS_POST){
			$this->display('Default/login');
		}else{
			$post = I('post.');
			$userModel = D('user');
			$data = $userModel->testLogin($post);
			$this->ajaxReturn($data);
		}
    }
	
	public function login_out(){
		cookie(null);
	}
}